import request from '@/utils/request'

/**
 * 获取
 * @param {Object} params 
 */
export function getDictionarySelect(params) {
  return request({
    url: 'API/BaseData/getDictionarySelect',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 获取发放列表
 * @param {Object} params 
 */
export function GetReceiveList(params) {
  return request({
    url: 'API/Bill/GetReceiveList',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 驳回领用数据
 * @param {Object} data 
 */
export function BatchRejectReceive(data) {
  return request({
    url: 'API/Bill/BatchRejectReceive',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
  })
}

/**
 * 获取库存数据
 * @param {Object} params 
 */
export function GetInStoreByCode(params) {
  return request({
    url: 'API/EnterStore/GetInStoreByCode',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 标准物质发放
 * @param {Object} params 
 */
export function GrantReceive(data) {
  return request({
    url: 'API/Bill/GrantReceive',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
  })
}

/**
 * 通过归还复核
 * @param {Object} params 
 */
export function PassReturn(data) {
  return request({
    url: 'API/Bill/PassReturn',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
  })
}

/**
 * 获取归还复核数据
 * @param {Object} params 
 */
export function GetAuditReturnList(params) {
  return request({
    url: 'API/Bill/GetAuditReturnList',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 驳回归还复核
 * @param {Object} params 
 */
export function BatchRejectReturn(data) {
  return request({
    url: 'API/Bill/BatchRejectReturn',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
  })
}

/**
 * 销毁归还复核
 * @param {Object} params 
 */
export function DestructionDeal(data) {
  return request({
    url: 'API/Bill/DestructionDeal',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
  })
}

/**
 * 获取归还复核数据
 * @param {Object} params 
 */
export function GetBarCodeInfo(params) {
  return request({
    url: 'API/EnterStore/GetBarCodeInfo',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 获取销毁数据列表
 * @param {Object} params 
 */
export function GetAuditDestructionList(params) {
  return request({
    url: 'API/Bill/GetAuditDestructionList',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 销毁审核通过
 * @param {Object} params 
 */
export function PassDestruction(data) {
  return request({
    url: 'API/Bill/PassDestruction',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
  })
}

/**
 * 销毁驳回
 * @param {Object} params 
 */
export function RejectDestruction(data) {
  return request({
    url: 'API/Bill/RejectDestruction',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
  })
}

/**
 * 获取供应商数据
 * @param {Object} params 
 */
export function GetCompanySelect(params) {
  return request({
    url: 'API/QualityStock/GetCompanySelect',
    method: 'get',
    params: params,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 获取库存物料信息
 * @param {Object} params 
 */
export function GetContrastStockMaterial(data) {
  return request({
    url: 'API/QualityStock/GetContrastStockMaterial',
    method: 'post',
    data,
    successMsg: false,
    failMsg: true
  })
}

/**
 * 获取库存物料信息
 * @param {Object} params 
 */
export function CreateFlatReceive(data) {
  return request({
    url: 'API/Bill/CreateFlatReceive',
    method: 'post',
    data,
    successMsg: true,
    failMsg: true
  })
}

